#include "csphere.h"

CSphere::CSphere():CStereoShape(), r(1.)
{   
}

CSphere::CSphere(double radius):r(radius)
{
}

CSphere::CSphere(const CSphere& a)
{
    this->r = a.r;
}

CSphere::~CSphere()
{  
    
}

double CSphere::GetArea()
{
    return 4 * 3.14 * r * r;
}

double CSphere::GetVolume()
{
    return 4 / 3 * 3.14 * r * r * r;
}

void CSphere::Show()
{
    printf("The radius = %f\narea = %f\nvolume = %f\n"
    , r, GetArea(), GetVolume());
}